home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tex / macros / contrib / xyps-c.tex < prev    next >
Encoding:
Text File  |  1995-03-15  |  2.1 KB  |  48 lines

  1. %% xyps-c.tex from $Id: xyps-c.doc,v 2.9 1994/06/09 14:38:56 ross Exp $
  2. %%
  3. %% XY-pic ``Colour extension'' PostScript backend support.
  4. %% Copyright (c) 1993-1994 Ross Moore <ross@mpce.mq.edu.au>
  5. %%
  6. %% This file is part of the XY-pic package for graphs and diagrams in TeX.
  7. %% See the companion README and INSTALL files for further information.
  8. %% Copyright (c) 1991-1994 Kristoffer H. Rose <kris@diku.dk>
  9. %%
  10. %% The XY-pic package is free software; you can redistribute it and/or modify
  11. %% it under the terms of the GNU General Public License as published by the
  12. %% Free Software Foundation; either version 2 of the License, or (at your
  13. %% option) any later version.
  14. %%
  15. %% The XY-pic package is distributed in the hope that it will be useful, but
  16. %% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  17. %% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  18. %% for more details.
  19. %%
  20. %% You should have received a copy of the GNU General Public License along
  21. %% with this package; if not, write to the Free Software Foundation, Inc.,
  22. %% 675 Mass Ave, Cambridge, MA 02139, USA.
  23. %%
  24. \ifx\xypscloaded\relax \message{not reloaded}\endinput \fi
  25. \let\xypscloaded=\relax \xycatcodes
  26. \xyrequire{color}
  27. \xyrequire{ps}
  28. \xycatcodes
  29. \xydef@\xyPSnewcolor@#1#2{%
  30.  \expandafter\DN@\expandafter{\csname *shape@#1@\endcsname}%
  31.  \DNii@{\relax}\ifx\next@\nextii@\newxycolor{#1}{}\relax\fi
  32.  \expandafter\DNii@\expandafter{\csname xyPSshape@#1@\endcsname}%
  33.  \expandafter\def\nextii@{\xyPScolor@{#2}}%
  34.  \ifx\nextii@\empty\expandafter\def\next@{\xyPSnotimplemented@@`#1'@@}%
  35.  \else
  36.  \edef\tmp@{\noexpand\let\expandafter\noexpand\next@
  37.  \expandafter\noexpand\nextii@}\expandafter\tmp@\fi }
  38. \xydef@\xyPScolor@#1{\bgroup
  39.  \def\preStyle@@{\xyPSpre@}\def\postStyle@@{\xyPSpost@}%
  40.  \let\modPSboxz@=\modXYstyle@ 
  41.  \xyPSsplitPS@{#1 /xycolor{#1}def }{}%
  42.  \toks@={\egroup\let\xy@style@=\relax \def\Drop@@}%
  43.  \expandafter\addtotoks@\expandafter{\expandafter{\Drop@@}\def\Connect@@}%
  44.  \expandafter\addtotoks@\expandafter{\expandafter{\Connect@@}}\the\toks@}
  45. \xyPSalternative@{\xycolor@}{color}
  46. \xyPSalternative@{\newxycolor@}{newcolor}
  47. \xyendinput
  48.